﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using GDF_kaart_inlezen;

namespace GDF_kaart_inlezen.strategy_classes
{
    class VolumeHeader : ReadingStrategy
    {
        public VolumeHeader()
        {
            recordCode = "01";
        }

        public override void Process(string record)
        {
            counter = 0;
            String fieldValue;

            if (record.Substring(0, 2) == recordCode) record = record.Substring(2);
            fieldValue = GetFieldValue("SUP_NAME", ref record);
            //Implement processing
            fieldValue = GetFieldValue("STAN_NAME", ref record);
            //Implement processing
            fieldValue = GetFieldValue("VERSION", ref record);
            //Implement processing
            fieldValue = GetFieldValue("CREA_DATA", ref record);
            //Implement processing
            fieldValue = GetFieldValue("VOL_SIZE", ref record);
            //Implement processing
            fieldValue = GetFieldValue("ALBUM_ID", ref record);
            //Implement processing
            fieldValue = GetFieldValue("TOT_VOL", ref record);
            //Implement processing
            fieldValue = GetFieldValue("VOL_ID", ref record);
            //Implement processing
            fieldValue = GetFieldValue("CHAR_SET", ref record);
            //Implement processing
            fieldValue = GetFieldValue("CORI_DATA", ref record);
            //Implement processing
            fieldValue = GetFieldValue("NUM_DASET", ref record);
            int num_daset = Int32.Parse(fieldValue);
            for (int i = 0; i < num_daset; i++)
            {
                fieldValue = GetFieldValue("DASET_ID", ref record);
                //Implement processing
                fieldValue = GetFieldValue("VOL_ID", ref record);
                //Implement processing
            }
            fieldValue = record.Trim();
            //Implement processing (CORI_OWNER)
        }
    }
}
